﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PlaydeezGames.Common
{
    public static class RandomNumberGenerator
    {
        private static Random current = new Random();
        private static Stack<Random> stack = new Stack<Random>();

        public static Random Current
        {
            get
            {
                return current;
            }
            set
            {
                current = value;
            }
        }

        public static void Push()
        {
            stack.Push(Current);
        }

        public static void PushAndSet(Random theRandom)
        {
            Push();
            Current = theRandom;
        }

        public static void Pop()
        {
            Current = stack.Pop();
        }
    }
}
